package com.qqtop10.manager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.BroadcastMapper;
import com.qqtop10.manager.model.Broadcast;
import com.qqtop10.manager.model.PagingArgs;
import com.qqtop10.manager.service.BroadcastService;


/**
 * 
 * @ClassName: BroadcastServiceImpl
 * @author ChenXinwei
 * @date 2015年8月12日 上午11:43:51
 *
 */
@Service("broadcastService")
public class BroadcastServiceImpl extends BaseService implements BroadcastService {

	@Autowired
	private BroadcastMapper broadcastMapper;

	@Override
	public List<Broadcast> all(Broadcast input, PagingArgs pagingArgs) {
		return broadcastMapper.all(asMap(input, pagingArgs));
	}

	@Override
	public int count(Broadcast input) {
		return broadcastMapper.count(input);
	}

	@Override
	public boolean put(Broadcast input) {
		return broadcastMapper.put(input) != 0;
	}

	@Override
	public boolean delete(int id) {
		return broadcastMapper.delete(id) != 0;
	}

}
